import os

log_name_applog                                     = 'app_log'
log_name_downloaderlog                              = 'downloader_log'

clipboard_refresh_interval                          = 0.5
upload_status_refresh_interval                      = 1.5
http_format_pattern                                 = '(http://|https://)'

project_path                                        = os.path.dirname(__file__) + '\\'
settings_path                                       = project_path + 'settings\\'
archive_path                                        = project_path + 'archive\\'
archive_filename                                    = archive_path + 'url_archive.txt'
log_path                                            = project_path + 'log\\'
app_log_path                                        = log_path + 'applog\\'
links_log_path                                      = log_path + 'links\\'
downloader_log_path                                 = log_path + 'downloaderlog\\'
download_save_path                                  = project_path + 'download\\'
download_log_finish_pattern                         = '(\[download\] 100%|already been downloaded)'
downloader_logging_file_path                        = log_path + 'downloaderlog\\'
downloader_logging_file_completed_path              = downloader_logging_file_path + 'completed\\'
downloader_logging_file_failed_path                 = downloader_logging_file_path + 'failed\\'
downloader_logging_file_todo_path                   = downloader_logging_file_path + 'todo\\'
downloader_logging_file_completed_pattern           = 'video is downloaded, url: '
downloader_logging_file_failed_pattern              = 'video is NOT downloaded, url: '
uploader_logging_file_path                          = log_path + 'uploaderlog\\'
uploader_logging_file_completed_path                = uploader_logging_file_path + 'completed\\'
uploader_logging_file_failed_path                   = uploader_logging_file_path + 'failed\\'
uploader_logging_file_todo_path                     = uploader_logging_file_path + 'todo\\'
uploader_logging_file_completed_pattern             = 'video is uploaded, url: '
uploader_logging_file_failed_pattern                = 'video is NOT uploaded, url: '

third_party_downloader_path                         = project_path + 'thirdparty\\youtube-dl\\youtube-dl.exe'
third_party_downloader_option                       = '-o' + ' ' + download_save_path +\
                                                      '%(title)s.%(ext)s' + ' ' + '--write-info-json'

empty_file_exception                                = 'EmptyFileException'
log_file_delimiter                                  = '_'
links_log_id_index                                  = 2
downloader_log_id_index                             = 2

tudou_api_app_key                                   = 'b52ab84cac764666'
tudou_api_app_secret                                = '730ee8323562d41893a42bf0acdf2a4e'
tudou_api_access_token                              = 'a4_BkoZaaJZyTmkyywkea5ykTNaywBNkpTNBaT4gwawJ_g___pZZNggoZZBp4_gmmpp5ZomZg_5ZB'
tudou_api_upload_url                                = 'http://api.tudou.com/v6/video/upload_url'
tudou_api_upload_channelid                          = 21
tudou_api_upload_tags                               = 'vex,robotics'
tudou_api_upload_max_length                         = 5000
tudou_api_upload_reset_interval                     = 100
tudou_api_upload_emsg_expired_token                 = 'Expired access_token'
tudou_api_upload_status_finish                      = 'finish'
tudou_api_upload_status_fail                        = 'failed'
tudou_api_upload_status_init                        = 'init'
tudou_api_upload_status_uploading                   = 'uploading'